from pydub import AudioSegment


audio_path = './audio.wav'

full_audio = AudioSegment.from_wav(audio_path)

#print full_audio.frame_rate

full_audio16K = full_audio.set_frame_rate(16000)

full_audio16K.export('./audio16K.wav',format='wav')


#test_audio= AudioSegment.from_wav()

full_audio16K[2620:11775].export('./audio_part.wav',format='wav')
